package com.guomao.demo;

public class DemoA {


    public static void main(String[] args) {


        int result = factorial(20);

        System.out.println(result);

    }


    public static int factorial(int x) {

        if (x == 0) return 1;

        int i = factorial(x - 1);
        return x * i;
    }
}
